package com.it.zhangjun.design.pattern.observer;

/**
 * @className: Client
 * @description: 测试类
 * @author: z00018123
 * @date: 2021/4/29
 **/
public class Client {
    public static void main(String[] args) {
        //被观察者
        ImportedRedDeliciousApple importedRedDeliciousApple = new ImportedRedDeliciousApple();

        //初始化预定客户类
        CustomerObserver a = new CustomerObserver("A");
        CustomerObserver b = new CustomerObserver("B");
        CustomerObserver c = new CustomerObserver("C");

        importedRedDeliciousApple.addObserver(a);
        importedRedDeliciousApple.addObserver(b);
        importedRedDeliciousApple.addObserver(c);

        importedRedDeliciousApple.notifyObserver();

    }
}
